package com.cuixichang.minimalism.transfer.factory;

import com.cuixichang.minimalism.transfer.dto.IFormDTO;
import com.cuixichang.minimalism.transfer.page.IFormPageRequest;
import com.cuixichang.minimalism.transfer.page.IFormQueryRequest;
import com.cuixichang.minimalism.transfer.page.IFormRequest;
import com.cuixichang.minimalism.transfer.vo.IFormVO;
import com.cuixichang.minimalism.transfer.po.IForm;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 拓展表单功能表对象适配器
 *
 * @author cuixichang
 * @date 2024-12-18
 */
@Mapper(builder = @Builder(disableBuilder = true))
public interface IFormAssembler {

    IFormAssembler INSTANCT = Mappers.getMapper(IFormAssembler.class);

    IFormDTO convertDto(IFormRequest request);

    IFormDTO convertDto(IFormQueryRequest request);

    IFormDTO convertDto(IFormPageRequest request);

    IForm convertPo(IFormDTO dto);

    IFormDTO convertDto(IForm po);

    IFormVO convertVo(IFormDTO dto);
}